package com.lframework.xingyun.basedata.dto.product;

import com.lframework.starter.web.core.dto.BaseDto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;

@Data
public class ProductSpecDto implements BaseDto, Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 商品规格id
     */
    @ApiModelProperty(value = "商品规格id")
    private String specId;

    /**
     * 商品规格名称
     */
    @ApiModelProperty(value = "商品规格名称")
    private String spec;

    /**
     * SKU编码
     */
    @ApiModelProperty(value = "SKU编码")
    private String skuCode;

    /**
    * 基础单位
    */
    @ApiModelProperty(value = "基础单位")
    private String unit;

    /**
     * 库存单位
     */
    @ApiModelProperty(value = "库存单位", required = true)
    private String stockUnit;

    /**
     * 采购价
     */
    @ApiModelProperty(value = "采购价", required = true)
    private BigDecimal purchasePrice;

    /**
     * 零售单位
     */
    @ApiModelProperty(value = "零售单位", required = true)
    private String retailUnit;

    /**
     * 零售价
     */
    @ApiModelProperty(value = "零售价", required = true)
    private BigDecimal retailPrice;

    /**
     * 销售单位
     */
    @ApiModelProperty(value = "销售单位", required = true)
    private String salesUnit;

    /**
     * 销售价
     */
    @ApiModelProperty(value = "销售价", required = true)
    private BigDecimal salePrice;

    /**
     * 重量
     */
    @ApiModelProperty(value = "重量")
    private BigDecimal weight;

    /**
     * 体积
     */
    @ApiModelProperty(value = "体积")
    private BigDecimal volume;

    /**
     * 是否可用
     */
    @ApiModelProperty(value = "是否可用")
    private Boolean available;

    /**
     * 属性值组合id
     */
    @ApiModelProperty(value = "属性值组合id")
    private String validPropertyValues;

    /**
     * 规格列表
     */
    @ApiModelProperty(value = "规格列表", required = true)
    private List<PropertyDto> property;

    @Data
    public static class PropertyDto implements BaseDto, Serializable {

        private static final long serialVersionUID = 1L;

        /**
         * 属性id
         */
        @ApiModelProperty(value = "属性id", required = true)
        private String propertyId;

        /**
         * 属性值Id
         */
        @ApiModelProperty(value = "属性值Id", required = true)
        private String propertyItemId;
    }
}
